package com.ruoyi.system.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * 订单评价表
 * @TableName order_comment
 */
@TableName(value ="order_comment")
public class OrderComment implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单 ID
     */
    private Long orderId;

    /**
     * 订单编号（唯一）
     */
    private String orderNo;

    /**
     * 评价人角色 1=买家 2=商家 3=骑手
     */
    private Integer fromRole;

    /**
     * 买家 ID
     */
    private Long userId;

    /**
     * 商家 ID
     */
    private Long merchantId;

    /**
     * 骑手 ID
     */
    private Long riderId;

    /**
     * 配送评分 1‑5（对骑手）
     */
    private Integer ratingRider;

    /**
     * 商品/口味评分 1‑5（对商家）
     */
    private Integer ratingDish;

    /**
     * 评价文字
     */
    private String content;

    /**
     * 评价图片列表(JSON 数组)
     */
    private Object imgs;

    /**
     * 官方回复
     */
    private String reply;

    /**
     * 回复时间
     */
    private Date replyTime;

    /**
     * 评价人用户 ID
     */
    private Long createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 逻辑删除 0=正常 1=已删
     */
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 订单 ID
     */
    public Long getOrderId() {
        return orderId;
    }

    /**
     * 订单 ID
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    /**
     * 订单编号（唯一）
     */
    public String getOrderNo() {
        return orderNo;
    }

    /**
     * 订单编号（唯一）
     */
    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    /**
     * 评价人角色 1=买家 2=商家 3=骑手
     */
    public Integer getFromRole() {
        return fromRole;
    }

    /**
     * 评价人角色 1=买家 2=商家 3=骑手
     */
    public void setFromRole(Integer fromRole) {
        this.fromRole = fromRole;
    }

    /**
     * 买家 ID
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 买家 ID
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 商家 ID
     */
    public Long getMerchantId() {
        return merchantId;
    }

    /**
     * 商家 ID
     */
    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    /**
     * 骑手 ID
     */
    public Long getRiderId() {
        return riderId;
    }

    /**
     * 骑手 ID
     */
    public void setRiderId(Long riderId) {
        this.riderId = riderId;
    }

    /**
     * 配送评分 1‑5（对骑手）
     */
    public Integer getRatingRider() {
        return ratingRider;
    }

    /**
     * 配送评分 1‑5（对骑手）
     */
    public void setRatingRider(Integer ratingRider) {
        this.ratingRider = ratingRider;
    }

    /**
     * 商品/口味评分 1‑5（对商家）
     */
    public Integer getRatingDish() {
        return ratingDish;
    }

    /**
     * 商品/口味评分 1‑5（对商家）
     */
    public void setRatingDish(Integer ratingDish) {
        this.ratingDish = ratingDish;
    }

    /**
     * 评价文字
     */
    public String getContent() {
        return content;
    }

    /**
     * 评价文字
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * 评价图片列表(JSON 数组)
     */
    public Object getImgs() {
        return imgs;
    }

    /**
     * 评价图片列表(JSON 数组)
     */
    public void setImgs(Object imgs) {
        this.imgs = imgs;
    }

    /**
     * 官方回复
     */
    public String getReply() {
        return reply;
    }

    /**
     * 官方回复
     */
    public void setReply(String reply) {
        this.reply = reply;
    }

    /**
     * 回复时间
     */
    public Date getReplyTime() {
        return replyTime;
    }

    /**
     * 回复时间
     */
    public void setReplyTime(Date replyTime) {
        this.replyTime = replyTime;
    }

    /**
     * 评价人用户 ID
     */
    public Long getCreateBy() {
        return createBy;
    }

    /**
     * 评价人用户 ID
     */
    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 逻辑删除 0=正常 1=已删
     */
    public Integer getIsDelete() {
        return isDelete;
    }

    /**
     * 逻辑删除 0=正常 1=已删
     */
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderComment other = (OrderComment) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
            && (this.getFromRole() == null ? other.getFromRole() == null : this.getFromRole().equals(other.getFromRole()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId()))
            && (this.getRiderId() == null ? other.getRiderId() == null : this.getRiderId().equals(other.getRiderId()))
            && (this.getRatingRider() == null ? other.getRatingRider() == null : this.getRatingRider().equals(other.getRatingRider()))
            && (this.getRatingDish() == null ? other.getRatingDish() == null : this.getRatingDish().equals(other.getRatingDish()))
            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
            && (this.getImgs() == null ? other.getImgs() == null : this.getImgs().equals(other.getImgs()))
            && (this.getReply() == null ? other.getReply() == null : this.getReply().equals(other.getReply()))
            && (this.getReplyTime() == null ? other.getReplyTime() == null : this.getReplyTime().equals(other.getReplyTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
        result = prime * result + ((getFromRole() == null) ? 0 : getFromRole().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode());
        result = prime * result + ((getRiderId() == null) ? 0 : getRiderId().hashCode());
        result = prime * result + ((getRatingRider() == null) ? 0 : getRatingRider().hashCode());
        result = prime * result + ((getRatingDish() == null) ? 0 : getRatingDish().hashCode());
        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
        result = prime * result + ((getImgs() == null) ? 0 : getImgs().hashCode());
        result = prime * result + ((getReply() == null) ? 0 : getReply().hashCode());
        result = prime * result + ((getReplyTime() == null) ? 0 : getReplyTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", orderNo=").append(orderNo);
        sb.append(", fromRole=").append(fromRole);
        sb.append(", userId=").append(userId);
        sb.append(", merchantId=").append(merchantId);
        sb.append(", riderId=").append(riderId);
        sb.append(", ratingRider=").append(ratingRider);
        sb.append(", ratingDish=").append(ratingDish);
        sb.append(", content=").append(content);
        sb.append(", imgs=").append(imgs);
        sb.append(", reply=").append(reply);
        sb.append(", replyTime=").append(replyTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}